package com.hongyue.zuoTi3;

import java.util.Scanner;

public class Demo {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入姓名");
        String xm = sc.nextLine();
        System.out.println("请输入年龄");
        String nl = sc.nextLine();
        System.out.println("请输入身高");
        String sg = sc.nextLine();
        System.out.println("请输入婚否");
        String hf = sc.nextLine();
        System.out.println("请输入性别");
        String xb = sc.nextLine();
        XueSheng xs = new XueSheng();
        xs.setXingMing(xm);
        xs.setNianLing(Integer.parseInt(nl));
        xs.setShenGao(Double.parseDouble(sg));
        xs.setHunFou(Boolean.parseBoolean(hf));
        xs.setXingBie(xb.charAt(0));
        System.out.println(xs);
    }
}
